﻿using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Linq;
using System.Text;
using System.Windows.Forms;

namespace LiveResults
{
    public partial class FrmSelProject : Form
    {
        public FrmSelProject()
        {
            InitializeComponent();
            lstRecent.DataSource = MainApp.LastProjects;
            
        }

        public bool IsCreateNew
        {
            get { return radioButton1.Checked; }
        }

        public BroadCastProject ExistingProjectToOpen
        {
            get
            {
                return lstRecent.SelectedItem as BroadCastProject;
            }
        }

        private void btnOK_Click(object sender, EventArgs e)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.OK;
        }

        private void btnCancel_Click(object sender, EventArgs e)
        {
            this.DialogResult = System.Windows.Forms.DialogResult.Cancel;
        }

        private void lstRecent_MouseDown(object sender, MouseEventArgs e)
        {
            radioButton2.Checked = true;
        }
    }
}
